<?php
include_once "index.php"; //调用index页面
$array=['n_title'=>'头条','n_desc'=>'视频'];//添加数据
$db=new DBO ('1705phpa','root','root');//链接数据
$res=$db->add('new',$array);//调用
if($res)//判断
{
    echo ("<script>alert('添加成功');location.href='./show.php'</script>");//成功跳转
}
else
{
    echo ("<script>alert('添加失败');location.href='./add.html'</script>");//失败跳转
}
?>